package com.jic.purchase.model.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@ApiModel(description = "purchase_order")
public class PurchaseOrder extends BaseEntity {

    @ApiModelProperty(notes = "主键")
    private Long id;

    @ApiModelProperty(notes = "采购单号")
    private String code;

    @ApiModelProperty(notes = "采购单名称")
    private String name;

    @ApiModelProperty(notes = "1采购单、2补货单、3退货单、4无采购收货单、5经销单、6、代销单、7、销售单；")
    private Integer type;

    @ApiModelProperty(notes = "合同id")
    private Long contractId;

    @ApiModelProperty(notes = "合同编码")
    private String contractCode;

    @ApiModelProperty(notes = "商家ID")
    private Long deptId;

    @ApiModelProperty(notes = "店铺Id")
    private Long storeId;

    @ApiModelProperty(notes = "店铺名称")
    private String storeName;

    @ApiModelProperty(notes = "供应商ID")
    private String supplierId;

    @ApiModelProperty(notes = "供应商名称")
    private String supplierName;

    @ApiModelProperty(notes = "仓库ID")
    private String warehouseId;

    @ApiModelProperty(notes = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(notes = "采购人编码")
    private Long purchaseUserId;

    @ApiModelProperty("结算货币")
    private String transactionCurrency;

    @ApiModelProperty(notes = "采购人名称")
    private String purchaseUserName;

    @ApiModelProperty(notes = "采购单状态：0-待提交(初始值）；1-待审核（商家/店铺已提交，供应商未接单）；2-已审核(商家/店铺已提交，店铺已接单）；3-审核拒绝(商家/店铺已提交，供应商拒绝接单）；4-已发货(商家/店铺已提交，供应商已发货）；5-已结案(商家/店铺已提交，供应商已发货，商家/店铺已收货（已入库））；6-已过期(生效时间内，未到达已结案状态）；6-已作废(商家/店铺与供应商均作废；或者由运营平台判定作废）；")
    private Integer status;

    @ApiModelProperty(notes = "来源类型；1 手动录入")
    private Integer fromType;

    @ApiModelProperty(notes = "收货方式 1 接收-入库 2 直接-入库 3 接收-检验-入库")
    private Integer receiveMethod;

    @ApiModelProperty(notes = "配送方式 1 快递物流")
    private Integer deliveryMethod;

    @ApiModelProperty(notes = "发货地址省份ID")
    private Long sendProvinceId;

    @ApiModelProperty(notes = "发货地址城市ID")
    private Long sendCityId;

    @ApiModelProperty(notes = "发货地址区、县ID")
    private Long sendAreaId;

    @ApiModelProperty(notes = "发货地址")
    private String sendAddress;

    @ApiModelProperty(notes = "收货地址省份ID")
    private Long receiveProvinceId;

    @ApiModelProperty(notes = "收货地址城市ID")
    private Long receiveCityId;

    @ApiModelProperty(notes = "收货地址区、县ID")
    private Long receiveAreaId;

    @ApiModelProperty(notes = "收货地址")
    private String receiveAddress;

    @ApiModelProperty(notes = "要货单号")
    private String deliveryCode;

    @ApiModelProperty(notes = "采购日期")
    private Date purchaseTime;

    @ApiModelProperty(notes = "预计到货日期")
    private Date deliveryTime;

    @ApiModelProperty(notes = "采购履行状态 1 未履行 2 部分履行 3 完全履行")
    private Integer fulfillStatus;

    @ApiModelProperty(notes = "附件 多个用,分割")
    private String annex;

    @ApiModelProperty(notes = "供应商助记码")
    private String supplierGlnCode;

    private String supplierContactsName;

}
